/*
 * @Date: 2024-04-02 14:58:12
 * @LastEditors: bingkui.wu
 * @LastEditTime: 2024-04-02 17:01:59
 * @Description: 课本关联单词
 */
import mongoose, { Schema, Model, Document } from "mongoose";

export interface IBookUnitWord extends Document {
    /** 教材Id */
    categoryId: number,
    /** 年级Id */
    gradeId: number
    /** 单元Id */
    unitId: number;
    /** 单词Id */
    wordId: string;
}

export interface IBookUnitWordModel extends Model<IBookUnitWord> {}

const schema = new Schema({
    categoryId: Number,
    gradeId: Number,
    unitId: Number,
    wordId: String,
});

export const BookUnitWord = mongoose.model<IBookUnitWord>("book_unit_word", schema) as IBookUnitWordModel;
